<!--
 * @FileDescription 信息框
 * @Author lz
 * @Date 20230129 16:52:27
 * @LastEditors lz
 * @LastEditTime 20230129 16:52:27
-->
<template>
    <div class="tipsBox">
        <!-- 收起 -->
        <div class="putAway" v-if="!state.show" @click="switchBtn">
            <img src="/structure/expandButton.png" alt="">
        </div>
        <!-- 展开 -->
        <div class="open" v-if="state.show">
            <div class="openBtn" @click="switchBtn"></div>
            <img src="/structure/decorBox.png" class="colorBlock">
            <div class="title"> {{ props.tipsModelTitle }}</div>
            <div class="l_box"></div>

            <div class="border-top"></div>
            <div class="border-left"></div>
            <div class="border-right"></div>
            <div class="border-bottom"></div>

            <!-- 角 -->
            <img src="/structure/lt_b.png" class="lt_b">
            <img src="/structure/rt_b.png" class="rt_b">
            <img src="/structure/lb_b.png" class="lb_b">
            <img src="/structure/rb_b.png" class="rb_b">
            <p class="TextContent">
                {{ props.tipsModelContent }}
            </p>
        </div>
    </div>
</template>

<script setup lang="ts">
import { reactive, ref, toRefs, onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onUnmounted, StyleValue, defineProps, defineEmits } from 'vue'
interface Props {
    tipsModelContent: string;
    tipsModelTitle: string;
}

const props = defineProps<Props>();
const state = reactive({
    show: true
})

function switchBtn() {
    state.show = !state.show
}
onMounted(() => {
    if (props.tipsModelContent == '') {
        state.show = false
    }

});

</script>

<style scoped>
.tipsBox {
    position: absolute;
    top: 100px;
    right: 400px;
}

.putAway {
    width: 73px;
    height: 73px;
    background-image: url('/structure/decorate_bor.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    text-align: center;
}

.putAway img {
    padding-top: 11px;
    width: 54px;
}

.open {
    position: relative;
    width: 1060px;
    color: #fff;
    padding: 40px 20px 20px 20px;
}

.colorBlock {
    width: 55px;
    height: 55px;
    position: absolute;
    left: 4px;
    top: 4px;
}

.title {
    position: absolute;
    left: 56px;
    top: 18px;
    font-size: 18px;
    font-weight: bold;
    color: #FEFFFF;
}

.lt_b {
    width: 31px;
    height: 31px;
    position: absolute;
    left: 0;
    top: 0;
}

.rt_b {
    width: 31px;
    height: 31px;
    position: absolute;
    right: 0;
    top: 0;
}

.lb_b {
    width: 31px;
    height: 31px;
    position: absolute;
    left: 0;
    bottom: 0;
}

.rb_b {
    width: 31px;
    height: 31px;
    position: absolute;
    right: 0;
    bottom: 0;
}

.l_box {
    width: 100%;
    height: 36px;
    background-image: url('/structure/Line.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.border-top:before {
    content: '';
    position: absolute;
    left: 2%;
    top: 4px;
    bottom: auto;
    right: auto;
    height: 2px;
    width: 96%;
    background-color: #3382B6;
}

.border-bottom:before {
    content: '';
    position: absolute;
    left: 2%;
    top: auto;
    bottom: 5px;
    right: auto;
    height: 2px;
    width: 96%;
    background-color: #3382B6;
}

.border-left:before {
    content: '';
    position: absolute;
    left: 4px;
    top: 10%;
    bottom: auto;
    right: auto;
    height: 80%;
    width: 2px;
    background-color: #3382B6;
}

.border-right:before {
    content: '';
    position: absolute;
    left: auto;
    top: 10%;
    bottom: auto;
    right: 5px;
    height: 80%;
    width: 2px;
    background-color: #3382B6;
}

.openBtn {
    position: absolute;
    right: 10px;
    top: 6px;
    width: 54px;
    height: 51px;
    background-image: url('/structure/stowButton.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.TextContent {
    color: #C3DAF4;
    font-size: 14px;
}
</style>